package com.jt.www.domain.enums.common;

import org.apache.commons.lang3.StringUtils;

/**
 *   {
 *           name: "委托协议签署流程延迟",
 *           code: "01",
 *         },
 *         {
 *           name: "框架协议/保险协议签署流程延迟",
 *           code: "02",
 *         },
 *         {
 *           name: "佣金比例确认延迟",
 *           code: "03",
 *         },
 *         {
 *           name: "保单/批单实际出具延迟",
 *           code: "04",
 *         },
 *         {
 *           name: "冲正调整重新确认",
 *           code: "05",
 *         },
 *         {
 *           name: "数据",
 *           code: "06",
 *         },
 *         {
 *           name: "补录确认",
 *           code: "07",
 *         },
 *         {
 *           name: "其他",
 *           code: "99",
 *         },
 *       ], //收入确认佐证原因
 */
public enum EvidenceReasonEnum {

    COMMISSIONPROTOCOLDELAY("01", "委托协议签署流程延迟"),
    FRAMEPROTOCOLDELAP("02", "框架协议/保险协议签署流程延迟"),
    COMMISSIONRATEDELAY("03", "佣金比例确认延迟"),
    ISSUANCEDELAY("04", "保单/批单实际出具延迟"),
    RECONFIRMATION("05", "冲正调整重新确认数据"),
    MAKEUPCONFIRMATION("06", "补录确认"),
    OTHER("99", "其他");

    private String code;

    private String desc;

    EvidenceReasonEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        if (StringUtils.isBlank(code)) {
            return "";
        }
        for (EvidenceReasonEnum pushStatusEnum : EvidenceReasonEnum.values()) {
            if (pushStatusEnum.code.equals(code)) {
                return pushStatusEnum.desc;
            }
        }
        return "";
    }


    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}


